package com.three.crm.adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.three.crm.R;
import com.three.crm.bean.CommonBean;

import java.util.List;

public class ArrivalListAdapter extends BaseQuickAdapter<CommonBean, BaseViewHolder> {

    public ArrivalListAdapter(@Nullable List<CommonBean> data) {
        super(R.layout.item_list_arrival,data);
    }

    public ArrivalListAdapter() {
        super(R.layout.item_list_arrival);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, CommonBean item) {
        helper.setText(R.id.tv_company,item.getTitle())
                .setText(R.id.tv_name, item.getGoods_name())
                .setText(R.id.tv_weight, "" + item.getGoods_weight())
                .setText(R.id.tv_unit, item.getGoods_unit())
                .setText(R.id.tv_car_info, item.getCar_info())
                .setText(R.id.tv_xhdd, item.getXh_address())
                .setText(R.id.tv_goods_time, item.getCar_time());
    }
}
